import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: AliceMana
 * Date: 2022-07-27
 * Time: 21:02
 */
public class Test {
    public static void main(String[] args) {
        //编写程序数一下 1到 100 的所有整数中出现多少个数字9
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i%10 == 9){
                count++;
            }
            if (i/10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }
    static boolean IsLeapYear(int year){
        if (((year%4 == 0) && (year%100 != 0)) || (year%400 == 0)){
            return true;
        }else{
            return false;
        }
    }
    public static void main4(String[] args) {

        //输出 1000 - 2000 之间所有的闰年
        int year = 0;
        for (int i = 1000; i <= 2000; i++) {
            if(IsLeapYear(i)){
                System.out.print(i+" ");
            }
        }
    }
    public static void main3(String[] args) {
        //打印 1 - 100 之间所有的素数
        for (int i = 1; i < 100; i++) {
            int flag = 0;
            for (int j = 2; j <= i / 2; j++) {
                if(i % j == 0){
                    flag = 1;
                    break;
                }
            }
            if (flag == 0){
                System.out.print(i+" ");
            }
        }
    }
    public static void main2(String[] args) {
        //给定一个数字，判定一个数字是否是素数
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.print("请输入一个正整数:>");
            int num = scanner.nextInt();
            int flag = 0;
            for (int i = 2; i <= num / 2; i++) {
                if (num % i == 0){
                    flag = 1;
                    System.out.println("不是素数");
                    break;
                }
            }
            if (flag == 0){
                System.out.println("是素数");
            }
        }
    }
    public static void main1(String[] args) {
        // java如何输入
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        System.out.println(a);
    }
}
